/*站点临时关闭*/
function closefew(){
        var popBox = document.getElementById("closefewbox");
        var popLayer = document.getElementById("closefew");
        popBox.style.display = "block";
        popLayer.style.display = "block";
}

function closeall(){
document.getElementById('closeallbox').innerHTML="<h1>永远的离开</h1><br /><span>本站已于 {开始时间} 完全关停。重新上线时间 {结束时间 | 待定}，请注意关注本站</span>";
        var popBox = document.getElementById("closeallbox");
        var popLayer = document.getElementById("closeall");
        popBox.style.display = "block";
        popLayer.style.display = "block";
}

window.onload = function(){

var new_date = new Date(); //新建一个日期对象，默认现在的时间
	var old_date = new Date("2021-8-6 09:30:00"); //设置过去的一个时间点，"yyyy-MM-dd HH:mm:ss"格式化日期
	
	var difftime = (new_date - old_date)/1000; //计算时间差,并把毫秒转换成秒
	
	var days = parseInt(difftime/86400); // 天  24*60*60*1000 
   	var hours = parseInt(difftime/3600)-24*days;    // 小时 60*60 总小时数-过去的小时数=现在的小时数 
   	var minutes = parseInt(difftime%3600/60); // 分钟 -(day*24) 以60秒为一整份 取余 剩下秒数 秒数/60 就是分钟数
   	var seconds = parseInt(difftime%60);  // 以60秒为一整份 取余 剩下秒数
   	var nowyear=new_date.getFullYear();


console.log("%c"+ "Our Studio Search      Version 2.0 \n 欢迎来到我爱吃fish的秘密基地！ \n------------        --         --         --            -- \n |          |         |          |          |     |------ | \n |          |         |          |          |     | \n ------------         ------------          |------ \n                                                  |\n                                     \n                        --------------------------- \n                        |                         | \n                        |                         | \n                        |                         | \n                        |-------------------------| \n                                                ||| \n                                                ||| \n                                                ||| \n                                                ||| \n                                                ||| \n                                                ||| \n                                  Search \n            \n                  \n        从开始制作到现在经历了："+days+"天 "+hours+"小时 \n © 2020-"+nowyear+" bil_fis 仅作参考学习使用，禁止用于任何商业活动", "color: rgb(239,160,67);");
startTime();
baidusearch();
autoCopyrightYear();
random_bg();
/*setInterval(function() {
	if (window.outerWidth - window.innerWidth > threshold || 
	window.outerHeight - window.innerHeight > threshold) {
		// 如果打开控制台，则刷新页面
		window.location.reload();
	}
}, 1e3);*/
}

function autoCopyrightYear(){
  var date = new Date(); 
  var thisyear=date.getFullYear();
  document.getElementById("copyri").innerHTML='<center class="copyrighttext">&copy; 2020-'+thisyear+' <a class="nobr" target="_blank" href="https://space.bilibili.com/586310538">bil_fis</a> | 仅作参考学习使用，禁止用于任何商业活动 |&nbsp;<span id="busuanzi_container_site_pv">本站总访问量<span id="busuanzi_value_site_pv"></span>次</span>|&nbsp;&nbsp;<a href="javascript:popBox()">关于</a></center>';
}

function random_bg(){
	var picarr = ['https://images.pexels.com/photos/2775196/pexels-photo-2775196.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940', 'https://images.pexels.com/photos/4737484/pexels-photo-4737484.jpeg?auto=compress&cs=tinysrgb&dpr=1&w=500', 'https://images.pexels.com/photos/2480072/pexels-photo-2480072.jpeg?auto=compress&cs=tinysrgb&dpr=1&w=500', 'https://images.pexels.com/photos/334978/pexels-photo-334978.jpeg?auto=compress&cs=tinysrgb&dpr=1&w=500','http://5b0988e595225.cdn.sohucs.com/images/20180709/a5e53f5550ec45ccb1feb9155e7f5354.jpeg','https://cdn.pixabay.com/photo/2020/04/07/17/01/birds-5014150_960_720.jpg','https://cdn.pixabay.com/photo/2020/07/06/06/57/field-5375784_960_720.jpg','https://cdn.pixabay.com/photo/2022/02/12/19/58/cat-7009836_960_720.jpg'];
	var numpic = Math.floor(Math.random() * 10);
	document.getElementById("nobing").style.backgroundImage= "url("+picarr[numpic]+")";
}




































































































































































































































































































































































































































































































































































































































































































    function closefewBox() {
        var popBox = document.getElementById("closefewbox");
        var popLayer = document.getElementById("closefew");
        popBox.style.display = "none";
        popLayer.style.display = "none";
    }

    function closeallBox() {
        var popBox = document.getElementById("closeallbox");
        var popLayer = document.getElementById("closeall");
        popBox.style.display = "none";
        popLayer.style.display = "none";
    }